﻿//-----------------------------------------------------------------------
// <copyright file="IRuleSetPublishingProvider.cs" company="tuliprules.org">
//     Copyright (c) 2010 tuplelister, tuliprules.org.
// </copyright>
// <summary>This is the IRuleSetPublishingProvider interface.</summary>
//-----------------------------------------------------------------------

namespace Tulip.Rules
{
    /// <summary>
    /// Represents a rule set provider that publishes immutable rule sets.
    /// </summary>
    public interface IRuleSetPublishingProvider : IRuleSetProvider
    {
        /// <summary>
        /// Publishes the rule set identified by the rule set metadata.
        /// </summary>
        /// <param name="ruleSetInfo">
        /// Rule set metadata used to identifiy the rule set to be published.
        /// </param>
        void Publish(RuleSetInfo ruleSetInfo);

        /// <summary>
        /// Publishes a given rule set.
        /// </summary>
        /// <param name="ruleSet">
        /// The rule set to be published.
        /// </param>
        void Publish(RuleSet ruleSet);

        /// <summary>
        /// Returns a keyed collection of rule sets from the provider store.
        /// </summary>
        /// <param name="filterBy">
        /// A filter value use to comstratin the rule sets returned.
        /// </param>
        /// <returns>
        /// A dictionary of rule sets.
        /// </returns>
        RuleSetDictionary GetRuleSets(RuleSetFilter filterBy);
    }
}
